// commons/diy/pt_list/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    setting: {
      type: Object,
      value: null
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
    goods: null
  },
  ready: function () {
    this.getGoods();
  },

  /**
   * 组件的方法列表
   */
  methods: {
    getGoods: function() {
        var e = this;
        getApp().request({
            url: getApp().api.group.list,
            method: "get",
            data: {
                page: 1
            },
            success: function(a) { console.log(a);
                0 == a.code && (e.setData({
                    goods: a.data.list
                }));
            }
        });
    },
  }
})
